export interface ResponseData {
    status: number
    success?: {
        message: string
    }
    error?: {
        message: string
        code: number
    }
}

// 大类名称模糊搜索
export interface BigFuzzySearch {
    mode: '名称' | '前缀'
    fuzzy_search_object: string
}
export interface BigFuzzyList {
    id: number
    value: string
    prefix: string
}

export interface BigFuzzySearchResponse extends ResponseData {
    big_fuzzy_list: BigFuzzyList[]
}

// 小类名称模糊搜索
export interface SmallFuzzySearch {
    mode: '名称' | '编号' | '型号'
    fuzzy_search_object: string
}
export interface SmallFuzzyList {
    value: string
    small_id: number
    small_name: string
    big_id: number
    big_name: string
    model: string
    unit_price: number
    units: string
    no: string
    number: number
}


export interface SmallFuzzySearchResponse extends ResponseData {
    small_fuzzy_list: SmallFuzzyList[]
}

// 小类名称模糊搜索（多条件版）
export interface SmallFuzzySearchM {
    small_name: string,
    model: string,
    no: string
}
export interface SmallFuzzyListM {
    value: string
    small_id: number
    small_name: string
    big_id: number
    big_name: string
    model: string
    unit_price: number
    units: string
    no: string
    number: number
}
export interface SmallFuzzySearchMResponse extends ResponseData {
    small_fuzzy_list: SmallFuzzyListM[]
}


// 处理方模糊搜索
export interface HandleFuzzySearch {
    mode: '名称' | '助记码'
    fuzzy_search_object: string
}

export interface HandleFuzzySearchResponse extends ResponseData {
    handle_fuzzy_list: HandleFuzzyList[]
}

export interface HandleFuzzyList {
    handle_id: number
    handle_name: string
    mnemonic: string
    value: string
    handle_group_name: string
}

// 处理方分组模糊搜索
export interface HandleClassFuzzySearch {
    mode: '名称' | '助记码'
    fuzzy_search_object: string
}

export interface HandleClassFuzzySearchResponse extends ResponseData {
    handle_class_fuzzy_list: HandleClassFuzzyList[]
}

export interface HandleClassFuzzyList {
    handle_class_id: number
    handle_class_name: string
    handle_class_mnemonic: string
    value: string
}